package cn.harry.modular.news.domain;

import cn.harry.common.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 新闻实体对象
 *
 * @author harry
 * @公众号 Harry技术
 */
@Getter
@Setter
@TableName("t_news")
public class News extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 标题
     */
    @TableField(condition = SqlCondition.LIKE)
    private String title;
    /**
     * 简介
     */
    @TableField(condition = SqlCondition.LIKE)
    private String descr;
    /**
     * 分类
     */
    private String category;
    /**
     * 内容
     */
    private String content;
    /**
     * 发布时间
     */
    private LocalDateTime time;
    /**
     * 图片
     */
    private String img;
    private String type;
    /**
     * 阅读量
     */
    private Integer readCount;
    /**
     * 评论量
     */
    private Integer commentCount;
    private Integer userId;
    private String userName;
    private String status;
    /**
     * 有效状态，0:无效 1:有效
     */
    private Integer valid;
}
